import 'package:json_annotation/json_annotation.dart';

part 'follow.g.dart';

@JsonSerializable()
class FollowModel {
  String avatar;

  String nickname;

  int travels;

  String fans;

  bool isFollow;

  FollowModel(
      {required this.avatar,
      required this.nickname,
      required this.travels,
      required this.fans,
      this.isFollow = false});

  factory FollowModel.fromJson(Map<String, dynamic> json) => _$FollowModelFromJson(json);

  Map<String, dynamic> toJson() => _$FollowModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}

@JsonSerializable()
class FansModel {
  String avatar;

  String nickname;

  int travels;

  String fans;

  bool isFollow;

  FansModel(
      {required this.avatar,
      required this.nickname,
      required this.travels,
      required this.fans,
      this.isFollow = false});

  factory FansModel.fromJson(Map<String, dynamic> json) => _$FansModelFromJson(json);

  Map<String, dynamic> toJson() => _$FansModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}

@JsonSerializable()
class FollowVideoModel {
  String avatar;

  String videoUrl;

  String nickname;

  String publishTime;

  String address;

  String introduce;

  bool isPlay;

  FollowVideoModel({
    required this.avatar,
    required this.videoUrl,
    required this.nickname,
    required this.publishTime,
    required this.introduce,
    required this.address,
    this.isPlay = false,
  });

  factory FollowVideoModel.fromJson(Map<String, dynamic> json) => _$FollowVideoModelFromJson(json);

  Map<String, dynamic> toJson() => _$FollowVideoModelToJson(this);

  @override
  String toString() {
    return toJson().toString();
  }
}
